From 2ed5c7bbf0751f6b255f4db229d30beafd093a05 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Fri, 15 Jan 2016 08:59:55 -0800 Subject: [PATCH] Document --nocapture to reduce confusion running tests. Although this is a feature of rustc's test harness and not cargo's test driver, I can never remember how to invoke it. Describing the switch in `cargo test --help` makes it more discoverable. --- src/bin/test.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bin/test.rs b/src/bin/test.rs index 789dc002b..b919b52a5 100644 --- a/src/bin/test.rs +++ b/src/bin/test.rs @@ -65,6 +65,12 @@ The --jobs argument affects the building of the test executable but does not affect how many jobs are used when running the tests. Compilation can be configured via the `test` profile in the manifest. + +By default the rust test harness hides output from test execution to +keep results readable. Test output can be recovered (e.g. for debugging) +by passing `--nocapture` to the test binaries: + + cargo test -- --nocapture "; pub fn execute(options: Options, config: &Config) -> CliResult> { -- 2.30.2